﻿@model Dexter.Web.Mvc.ViewModel.Backoffice.ViewsData.PostController.PostDeleteViewData

@{
	ViewBag.Title = "ConfirmDelete";
	Layout = "~/Areas/Admin/Views/Shared/_BackOffice.cshtml";
}

<div class="block-content">
	<div class="task with-legend">
		<div class="legend"><img src="@Url.Content( "~/admin/Resources/images/Icons/Fugue/status.png" )" width="16" height="16">Delete Post</div>
					
		<div class="task-description">
			<ul class="floating-tags float-left">
				<li class="tag-time">@Model.Post.PublishDate.ToShortDateString()</li>
				<li class="tag-user">@Model.Post.Username</li>
			</ul>
						
			<p><strong>Title :</strong>@Model.Post.Title</p>
			<p><strong>Abstract :</strong>@Model.Post.Abstract</p>
			<p><strong>Categories :</strong>
				@for (int i = 0; i < Model.Post.Categories.Count; i++) {
					@Model.Post.Categories[i].Name
						if (i < Model.Post.Categories.Count-1 ) {
							Response.Write ( ", " );
						}
				}
			</p>
			<p><strong>Published :</strong> @Model.Post.IsPublished</p>
			<p><strong>Url: </strong><a href="@U.Post.Detail(Model.Post)"> Click Here</a></p>
			<p><strong>Comments :</strong> @Model.Post.TotalComments</p>
			<p><strong>Trackback :</strong> @Model.Post.TotalTrackback</p>
			<p>
				<strong>Tags :</strong>
				<ul class="keywords">
					@{int c = 0;}
						@foreach(var category in Model.Post.Categories) {
							if (c >3) { c = 0; }
							if (c ==0) {
								<li>@category.Name</li>
							}

							if (c ==1) {
								<li class="orange-keyword">@category.Name</li>
							}

							if (c ==2) {
								<li class="purple-keyword">@category.Name</li>
							}

							if (c ==3) {
								<li class="green-keyword">@category.Name</li>
							}
										
							c++;
						}
				</ul>
			</p>
						
		</div>
					
		<ul class="task-dialog">
			<li>
				<form method="post" action="../../Delete">
					@Html.AntiForgeryToken()
					@Html.Hidden("id", Model.Post.Id )
					<button type="button" onclick="location.href='@U.Post.Detail(Model.Post)'">View</button>
					<button type="button" onclick="location.href='@U.Post.Edit(Model.Post)'">Edit</button>
					<button type="submit">Confirm Delete</button>
				</form>
			</li>
		</ul>
	</div>
</div>